package com.zh.webcommon.upload;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Map;

/**
 * @author ZH
 * @date 15:11 2022/1/14
 */
@Data
@ConfigurationProperties(prefix = "spring.minio")
public class MinioUploadProperties {
    private String endpoint;
    private String accessKey;
    private String secretKey;

    private Map<String,String> buckets;

    public String getBucket(FileKind fileKind) {
        return buckets.get(fileKind.getAlias());
    }
}
